import { request } from '@/utils/request';
import type { UserResult } from '@/api/admin/model/userModel';

const Api = {
  UserQuery: '/admin.user/query',
  UserSave: '/admin.user/save',
  UserDelete: '/admin.user/delete',
};

export function getUser() {
  return request.get<UserResult>({
    url: Api.UserQuery,
  });
}

export function saveUser(data: any) {
  return request.post({
    url: Api.UserSave,
    params: data,
  });
}

export function deleteUser(data: any) {
  return request.post({
    url: Api.UserDelete,
    params: data,
  });
}
